extends Area

export var item_type = 0




func _on_Item_body_entered(body):
	if body is KinematicBody:
		#print ("collected item - type = " + str(item_type))
		
		var collectorNode = body.find_node("PlayerInventory", true, false)
		if collectorNode != null:
			#print ("collectorNode found")
			collectorNode.gem_collected(item_type)
			queue_free()
		else:
			print ("_on_Item_body_entered: error - collectorNode == null")
